<h3>Chi tiết nhà cung cấp</h3>
<hr />
<style>
	table {
 		border-color: #600;
    	border-width: 0 0 1px 1px;
    	border-style: solid;
		margin-left: 50px;
	}
	
	td {
		border-color: #600;
	    border-width: 1px 1px 0 0;
	    border-style: solid;
	    margin: 0;
		padding: 8px;
	    background-color: #fcfcfc;
	}
</style>
<?php echo validation_errors() ?>

	 <table width="80%">
		<tr>
			<td class=""><label for = "name">Tên công ty</label></td>
			<td><label><?php echo $name ?></label></td>
		</tr>
		<tr>
			<td><label for = "logo">Logo</label></td>
			<td><img src="<?php echo base_url().$logo?>" /></td>
		</tr>
		<tr>
			<td><label>Số điện thoại</label></td>
			<td><label><?php echo $phone ?></label></td>
		</tr>
		<tr>
			<td><label>Email</label></td>
			<td><label><?php echo $email ?></label></td>
		</tr>

		<tr>
			<td><label>Địa chỉ</label></td>
			<td><label><?php echo $address ?></label></td>
		</tr>
		<tr>
			<td><label>Quận</label></td>
			<td><label><?php echo $district ?></label></td>
		</tr>
		<tr>
			<td><label>Tỉnh/thành phố</label></td>
			<td><label><?php echo $province ?></label></td>
		</tr>
		<tr>
			<td><label>Quốc gia</label></td>
			<td><label><?php echo $country ?></label></td>
		</tr>
		<tr>
			<td><label>Map</label></td>
			<td><img src="<?php echo base_url().$map?>" /></td>
		</tr>
		<tr>
			<td>Công ty giới thiệu</td>
			<td><p><?php echo $introduction ?></p></td>
		</tr>
		<tr>
			<td>Điều khoản sử dụng</td>
			<td><p><?php echo $policy ?></p></td>
		</tr>
		<tr>
			<td>Lưu ý khách hàng</td>
			<td><p><?php echo $userPolicy ?></p></td>
		</tr>
		<tr>
			<td><label>Danh mục</label></td>
			<td>
				<?php foreach ($list_category as $item): ?>
					<input type = 'checkbox' name = 'pricePolicy' value = '<?php echo $item['id'];?>' 
					<?php
					foreach ($category as $cat):
						if($item['id']==$cat['category_id']){
							echo "checked";
						}
					endforeach;
					?>>
					<?php echo $item['categoryName']; ?>
				<?php endforeach;?>
			</td>
		</tr>
		<tr>
			<td><label>Chế độ giảm giá</label></td>
			<td>
				<?php foreach ($list_pricePolicy as $item): ?>
					<input type = 'checkbox' name = 'pricePolicy' value = '<?php echo $item['id'];?>' 
					<?php
					foreach ($pricePolicy as $pp):
						if($item['id']==$pp['pricepolicy_id']){
							echo "checked";
						}
					endforeach;
					?>>
					<?php echo $item['value']; ?>
				<?php endforeach;?>
			</td>
		</tr>
		<tr>
			<td><label>Chế độ thời gian</label></td>
			<td>
				<?php foreach ($list_timePolicy as $item): ?>
					<input type = 'checkbox' name = 'timePolicy' value = '<?php echo $item['id'];?>' 
					<?php
					foreach ($timePolicy as $tp):
						if($item['id']==$tp['timepolicy_id']){
							echo "checked";
						}
					endforeach;
					?>>
					<?php echo $item['value']; ?>
				<?php endforeach;?>
			</td>
		</tr>
		<tr>
			<td>Trạng thái</td>
			<td><?php echo $status;?></td>
		</tr>
		<tr>
			<td><label>Cấp</label></td>
			<td>
			<select name = 'level'>
				<?php foreach ($list_level as $item): ?>
					<option name = '<?php 
						echo $item['level'];
					?>'
					<?php
						if($item['level']==$level){
						echo "selected";
					}
					?>
					><?php echo $item['level'];?></option>
				<?php endforeach;?>
			</select>
			</td>
		</tr>
	</table>